home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000032_icon-group-sender _Mon May 18 12:44:11 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id MAA24536
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Mon, 18 May 1998 12:44:11 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA22953; Mon, 18 May 1998 12:44:06 -0700
  7. Date: Mon, 18 May 1998 13:25:59 -0500
  8. Message-Id: <199805181825.NAA29555@segfault.cs.utsa.edu>
  9. From: Clinton Jeffery <jeffery@segfault.cs.utsa.edu>
  10. To: vladimir.grodzenski@capway.com
  11. Cc: icon-group@optima.CS.Arizona.EDU
  12. In-Reply-To: <199805161337.PAA01330@capway.com> (grodzens@capway.com)
  13. Subject: Re: Annoying things
  14. Reply-To: jeffery@cs.utsa.edu
  15. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  16. Status: RO
  17. Content-Length: 1673
  18.  
  19.  
  20.    > system("C:\\PROGRA~1\\ACCESS~1\\WORDPAD.EXE noname.icn")
  21.    > or
  22.    > system("C:\\Program Files\\Accessories\\Wordpad.exe noname.icn")
  23.  
  24.    Surprisingly, the second solution (i.e. with long names) does not 
  25.    work under my Windows95... The first one with DOS file names works 
  26.    fine. Weird!
  27.  
  28. I suspect that the command-line argument processing breaks up the latter
  29. string incorrectly at the first space character unless the command is quoted:
  30.  
  31.    > system("\"C:\\Program Files\\Accessories\\Wordpad.exe\" noname.icn")
  32.  
  33. but I haven't checked to see if that is a proper fix yet.
  34.  
  35. >   OTOH, I still cannot figure out how to list the directory since the
  36. >   DOS "DIR" command system("dir > foo") does nor redirect output to a 
  37. >   file... Using Int86 function is not possible in WinIcon.
  38.  
  39. Under Windows Icon, open(dirname) should return a file value that produces
  40. the filenames in the directory, one per line.  With the present #ifdef's,
  41. this may only be enabled for the wicont program, not with nticont, but it
  42. should be easy to enable it for both.
  43.  
  44. Going back to your original system("dir > foo") example, I would note that
  45. dir is an "internal" program built-in to command.com or cmd.exe and that
  46. you may be able to get better behavior by explicitly naming the desired
  47. invocation of your command interpreter, something like
  48.     system("C:\\WINDOWS\\COMMAND.COM /C /Q dir >foo")
  49. but redirection in such a case might still be a problem; I'll put it on
  50. my bug list and check it out.  UNIX (Linux) works much better!
  51.  
  52. Clint Jeffery, jeffery@cs.utsa.edu
  53. Division of Computer Science, The University of Texas at San Antonio
  54. Research http://www.cs.utsa.edu/research/plss.html
  55.